
<h1 style='font-size:25px;'>Listing <%= @title%></h1>
<%if @matching%>
<pre style='font-size: 10px;'><%=@matching%></pre>
<%end%>
<div class='table_container'>
<table cellspacing='5' class='sortable' style='float:right;'>
		<tr>
			<th width='16px;'><a>br</a></th>
			<th class="sorttable_alpha"><a>subject</a></th>
			<th style='width: 70px;'><a>date</a></th>
			<th style='width: 100px;'><a>status</a></th>
			<th class="sorttable_alpha"><a>content preview</a></th>
		</tr>
	<%for error in @errors%>
		<tr class='error'>
			<td sorttable_customkey="<%= error.browser ?  error.browser : ''%>"><%= small_browser_img error.browser %></td>
			<td style='width: 100px;'>
				<%=link_to error.subject_preview(50), error_path(error)%>
			</td>
			<td sorttable_customkey="<%=error.created_at.strftime("%Y%m%d%H%M%p")%>">
				<%=error.created_at.strftime("%m/%d/%y")%>
			</td>
<% 
	status = 0
	if error.status == 'new'
		status = 1
	elsif error.status == 'accepted'
		status = 2
	elsif error.status == 'resolved'
		status= 3
	elsif error.status == 'closed'
		status = 4
	end

%>
			<td sorttable_customkey="<%=status.to_s%>" class='status <%=error.status%>' error='<%=error.id%>'>
				<%@error = error%>
				<%= error.status%>
			</td>
			<td>
				<div style='word-wrap: break-word;'>
					<%=h error.content_preview%>
				</div>
			</td>
		</tr>
	<%end%>
	<tfoot>
		<tr>
			<td colspan='5'>
				<%= link_to "back", {:controller=> 'home', :action=> 'myerrors'}, :style => 'float: right;'%>
				Click column headers to sort.  Click on a status to change its value.</td>
		</tr>
	</tfoot>
</table>
</div>
<script src='/jmvc/include.js?list,production' type='text/javascript'></script>
<script src="/javascripts/sorttable.js"></script>

